import java.util.Random;
import java.util.Scanner;

public class guess {
    public static void main(String[] args) {
        Random r = new Random();
        System.out.println("请猜数字：");
        int randomNum = r.nextInt(100) + 1;
        int n=0;
        Scanner sc = new Scanner(System.in);
        while (true) {
            int num = sc.nextInt();
            n ++;
            if (randomNum == num) {
                if (n == 1) {
                    System.out.println("你真厉害，一次就猜对了！");
                } else if (n > 1 && n < 5) {
                    System.out.println("你很聪明，猜对了！");
                } else {
                    System.out.println("笨蛋,你猜这么多次！");
                }
                System.out.println("程序结束！");
                break;
            } else if (randomNum < num) {
                System.out.println("大了");
            } else {
                System.out.println("小了");
            }
        }
    }
}

